/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { moveOutBlackList } from '@/services/sms/cloudBlack';
import { CloudBlack } from './index.d';
import { message } from 'antd';

function moveOutBlack(record: CloudBlack, actionRef: any) {
  const { courier_tel: cm_phone, courier_id: cm_id } = record;
  moveOutBlackList({ cm_phone, cm_id }).then((res) => {
    const { code, msg } = res;
    if (code == 0) {
      actionRef.current?.reload();
      message.success(msg);
    } else {
      message.success(msg);
    }
  });
}

export { moveOutBlack };
